import java.util.ArrayList;
import java.util.Scanner;

public class damo9 {
    public static void main(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < 3; i++) {
            Student s = new Student();
            System.out.println("请输入姓名");
            String next = sc.next();
            System.out.println("请输入年龄");
            int i1 = sc.nextInt();

            s.setName(next);
            s.setAge(i1);

            list.add(s);

        }
        for (int i = 0; i < list.size(); i++) {
            Student student = list.get(i);
            System.out.println(student.getAge() +","+student.getName());
        }


    }
}
